package com.example.demo.day.config.learn.design.order.x1;

public class OrderTest {

    public static void main(String[] args) {
        Stock stock = new Stock("ABC", 100);
        Stock stock1 = new Stock("XXX", 50);
        Stock stock2 = new Stock("XXX", 80);
        Order buyOrder = new BuyOrder(stock);
        Order buyOrder1 = new BuyOrder(stock2);
        Order sellOrder = new SellOrder(stock1);

        Broker broker = new Broker();
        broker.takeOrders(buyOrder);
        broker.takeOrders(buyOrder1);
        broker.takeOrders(sellOrder);
        broker.executeOrders();
    }
}
